 package com.cxl.adt.stack;
 /* Location:           E:\work\eclipse3.6_\workspace\design_pattern\
  * Qualified Name:     com.cxl.adt.stack.Reverser
  * JD-Core Version:    0.6.1
  */
 public class Reverser
 {
   private String input;
   private StringBuffer output = new StringBuffer();
 
   public Reverser(String in) { this.input = in; }
 
   public String doRve() {
     int stackSize = this.input.length();
     Stack stack = new Stack(stackSize);
 
     for (int i = 0; i < this.input.length(); i++) {
       char c = this.input.charAt(i);
       stack.push(c);
     }
 
     while (!stack.isEmpty()) {
       char c = stack.pop();
       this.output.append(c);
     }
     return this.output.toString();
   }
 }